package zhipu

import (
	"context"
	"gitee.com/flycash/ai-gateway-demo/internal/repository"
	"gitee.com/flycash/ai-gateway-demo/internal/service/llm/platform/base"
)

type Service struct {
	*base.Service
}

const (
	baseUrl = "https://open.bigmodel.cn/api/paas/v4/"
)

func NewService(apikey string, repo repository.PromptConfigRepo, taskRepo repository.AsyncTaskRepo) *Service {
	return &Service{
		base.NewService(apikey, baseUrl, repo, taskRepo, "glm-4-plus"),
	}
}

func (s *Service) Healthy(ctx context.Context) bool {
	// 随便调用一个查询接口就可以
	return true
}

//func (a *Service) AsyncInvoke(ctx context.Context, req domain.AsyncRequest) (domain.AsyncResponse, error) {
//	// 可以在这里做一些事情
//	resp, err := a.Service.AsyncInvoke(ctx, req)
//	// 在这里也做一些事情，进行一个封装
//	return resp, err
//}
